package demo5;

public class test {


    public static void main(String[] args) {
        StringBuffer stringBuffer = new StringBuffer("hello");
        String str1=stringBuffer.toString();

        String str2=new String(stringBuffer);
    }








    public static void main2(String[] args) {
        String str="hello world";
        StringBuffer stringBuffer = new StringBuffer(str);


        StringBuffer stringBuffer1 = new StringBuffer();
        stringBuffer1 = stringBuffer1.append(str);
    }







    public static void main1(String[] args) {
        StringBuffer stringBuffer = new StringBuffer();
        //创建大小为16的value数组

        StringBuffer stringBuffer1 = new StringBuffer(100);
        //capacity=100

        StringBuffer hello = new StringBuffer("hello");
        //super(str.length()+16);
    }
}
